package com.hgy.carsb.service;

import com.hgy.carsb.dao.DataMapper;
import com.hgy.carsb.entity.EveryMonthData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MonthInfoService {
    @Autowired
    private InfoService infoService;

    public EveryMonthData getDetail(int year, String zbCode, String prefix){
        EveryMonthData data = new EveryMonthData();
        data.setJanuary(infoService.getThisMonth(year, 1, zbCode, prefix));
        data.setFebruary(infoService.getThisMonth(year, 2, zbCode, prefix));
        data.setMarch(infoService.getThisMonth(year, 3, zbCode, prefix));
        data.setApril(infoService.getThisMonth(year, 4, zbCode, prefix));
        data.setMay(infoService.getThisMonth(year, 5, zbCode, prefix));
        data.setJune(infoService.getThisMonth(year, 6, zbCode, prefix));
        data.setJuly(infoService.getThisMonth(year, 7, zbCode, prefix));
        data.setAugust(infoService.getThisMonth(year, 8, zbCode, prefix));
        data.setSeptember(infoService.getThisMonth(year, 5, zbCode, prefix));
        data.setOctober(infoService.getThisMonth(year, 5, zbCode, prefix));
        data.setNovember(infoService.getThisMonth(year, 5, zbCode, prefix));
        data.setDecember(infoService.getThisMonth(year, 5, zbCode, prefix));
        return data;
    }
}
